package sy.model;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.GenericGenerator;

/**
 * SysProjectInformationMapping entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "sys_project_information_mapping", catalog = "ssh")
public class SysProjectInformationMapping implements java.io.Serializable {

	// Fields

	private String id;
	private SysInformation sysInformation;
	private SysProject sysProject;

	// Constructors

	/** default constructor */
	public SysProjectInformationMapping() {
	}

	/** full constructor */
	public SysProjectInformationMapping(SysInformation sysInformation,
			SysProject sysProject) {
		this.sysInformation = sysInformation;
		this.sysProject = sysProject;
	}

	// Property accessors
	@GenericGenerator(name = "generator", strategy = "uuid.string")
	@Id
	@Column(name = "id", unique = true, nullable = false, length = 64)
	public String getId() {
		return this.id;
	}

	public void setId(String id) {
		this.id = id;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "information")
	public SysInformation getSysInformation() {
		return this.sysInformation;
	}

	public void setSysInformation(SysInformation sysInformation) {
		this.sysInformation = sysInformation;
	}

	@ManyToOne(fetch = FetchType.EAGER)
	@JoinColumn(name = "project")
	public SysProject getSysProject() {
		return this.sysProject;
	}

	public void setSysProject(SysProject sysProject) {
		this.sysProject = sysProject;
	}

}